package cn.serenedream.housedecoration.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;

@Entity
@Table(name = "sale_saleproducts")
public class SaleSaleProducts {
    @Id
    Long id;

    @OneToOne
    Sale sale;

    @OneToOne
    SaleProducts saleProducts;

    public SaleSaleProducts() {
    }

    public SaleSaleProducts(Long id, Sale sale, SaleProducts saleProducts) {
        this.id = id;
        this.sale = sale;
        this.saleProducts = saleProducts;
    }

    /**
     * 获取
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取
     * @return sale
     */
    public Sale getSale() {
        return sale;
    }

    /**
     * 设置
     * @param sale
     */
    public void setSale(Sale sale) {
        this.sale = sale;
    }

    /**
     * 获取
     * @return saleProducts
     */
    public SaleProducts getSaleProducts() {
        return saleProducts;
    }

    /**
     * 设置
     * @param saleProducts
     */
    public void setSaleProducts(SaleProducts saleProducts) {
        this.saleProducts = saleProducts;
    }

    public String toString() {
        return "SaleSaleProducts{id = " + id + ", sale = " + sale + ", saleProducts = " + saleProducts + "}";
    }
}
